package com.wms.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wms.entity.Warehouse;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface WarehouseMapper extends BaseMapper<Warehouse> {

    @Select("SELECT * FROM warehouse")
    List<Warehouse> selectAll();

    @Select("SELECT * FROM warehouse WHERE company_id = #{companyId}")
    Warehouse findByCompanyId(Integer companyId);

    int insert(Warehouse warehouse);
//？？？
    void update(Warehouse warehouse);
}
